<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var data1 = new Date("2020/06/19 12:00:00")
    var data2 = new Date("2020/07/20 13:35:20")
    function timeCha(data1,data2){
        var t1 = data1.getTime()
        var t2 = data2.getTime()
    
        var day = parseInt(Math.abs(t2-t1)/1000/60/60/24);
        var hours =parseInt(( Math.abs(t2-t1)/1000/60/60 )% 24) 
        var min =parseInt(( Math.abs(t2-t1)/1000/60 )% 60) 
        var second =parseInt(( Math.abs(t2-t1)/1000)% 60)

        return day + "天"+hours+"小时"+min+"分"+second+"秒";
    }
    timeCha(data1,data2)
</script>
</html>